<seed-content>
  <seed-toolbar-header>
    <seed-toolbar-title>{{className}}</seed-toolbar-title>
    <seed-toolbar-menu></seed-toolbar-menu>
  </seed-toolbar-header>

  <div class="class-detail">
    <div class="seed-underline top-tabs">
      <div class="tab" [class.tabing]="tab.type===tabType" *ngFor="let tab of tabArray" (click)="chooseTab(tab.type)">
        {{tab.name}}
      </div>
    </div>
  </div>
  <!--教学点评-->
  <seed-infinite-scroll (infiniteScroll)="getLessonListForParent()">
    <div class="teacher-comment" *ngIf="tabType==='teacherComment'&&lessons.length>0">
      <div class="teacher-comment-total">课时（共{{lessons.length}}课时）</div>
      <lesson-comment-item *ngFor="let lesson of lessons;let i =index;" [lesson]="lesson" [index]="i"
                           (clicked)="goLessonComment(lesson)"></lesson-comment-item>
      <seed-infinite-scroll-content *ngIf="lessons.length>0"></seed-infinite-scroll-content>
    </div>
    <seed-default-graph *ngIf="!lessons.length&&tabType==='teacherComment'"
                        [text]="'暂无课时'"
                        [url]="'noData'"
    ></seed-default-graph>
  </seed-infinite-scroll>

  <!--教学计划-->
  <div class="teach-plan" *ngIf="tabType==='teachPlan'">
    <!--课程-->
    <div class="plan-header">
      <seed-tab>
        <seed-tab-item
          *ngFor="let tab of tabs; let i =index"
          [title]="tab.title"
        >
          <div class="each-tab"
               [ngClass]="{'item-no-data': tab.content === '暂无内容', 'tab-show': tab.isShow}"
          >
            <span>{{ !tab.hasExtend || tab.isShow ? tab.content : tab.shortContent}}</span>
            <span *ngIf="tab.hasExtend" (click)="tabContentSwitch(i)" class="text-switch">{{tab.isShow? '收起' : '展开'}}</span>
          </div>
        </seed-tab-item>
      </seed-tab>
    </div>
    <div class="seed-gap"></div>
    <!--教案-->
    <div class="plan-content">
      <h2 class="content-title">教案（共{{classSchedule?.length || 0}}课时）</h2>
      <div class="content-content">
        <lesson-comment-item (clicked)="goToPlanDetail(item, i)" *ngFor="let item of classSchedule; index as i" [lesson]="item" [index]="i"></lesson-comment-item>
        <!--<div class="content-item seed-flexbox seed-flexbox-content-between seed-underline seed-flexbox-align-center "-->
             <!--*ngFor="let item of classSchedule; index as i "-->
             <!--[class.seed-underline-none]="i == (classSchedule.length - 1)"-->
             <!--[routerLink]="['/train/plan/detail',item.id]"-->
             <!--[queryParams]="{subjectName: toolService.encodeUri('课时' + (i+1) + ':' + item.subjectName), teacherName: toolService.encodeUri(item.teacherName)}"-->
        <!--&gt;-->
          <!--<span class="subject-name">课时{{i+1}}：{{item.subjectName}}</span>-->
          <!--<span class="teacher-name">{{item.teacherName}}</span>-->
        <!--</div>-->
      </div>
    </div>
  </div>

  <!--教练信息-->
  <div *ngIf="tabType==='teacherInfo'">
    <div class="avatars-box" *ngIf="teachers.length>1">
      <ul class="avatars-list">
        <li *ngFor="let teacher of teachers;let j=index" [class.avatar-itm]="j===teacherIndex"
            (click)="chooseTeacher(teacher,j)">
          <img class="avatar-min" src="{{teacher?.photo || defaultIcon}}" alt="">
        </li>
      </ul>
    </div>
    <div class="teacher-info" *ngIf="curTeacherInfo">
      <div class="basic-info">
        <img class="avatar" src="{{curTeacherInfo?.photo || defaultIcon}}" alt="">
        <div class="info">
          <div><span class="key">教练名称</span>{{curTeacherInfo?.name}}</div>
          <div><span class="key">性别</span>{{curTeacherInfo?.sex===1?'男':(curTeacherInfo.sex===2?'女':'保密')}}</div>
          <div><span class="key">国籍</span>{{curTeacherInfo?.country}}</div>
          <div><span class="key">年龄</span>{{curTeacherInfo?.age}}</div>
          <div><span class="key">证书</span>{{curTeacherInfo?.certificateName}}</div>
        </div>
      </div>
      <div class="intro">
        <p class="title">教练简介</p>
        <div class="intro-content">{{curTeacherInfo?.intro}}</div>
      </div>
    </div>
  </div>

</seed-content>
